/* Copyright © 2010 LPRM
Universidade Federal do Espírito Santo - RNP-GT CWTools

This file is part of JoinUs!.

JoinUs! is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

JoinUs! is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JoinUs!. If not, see <http://www.gnu.org/licenses/>. */
package android.isisufes.home2;

import java.util.Vector;

public class Contacts {
	long id;

	public static Vector<Contacts> fromXml(String xml) {
		xml = xml.replaceAll("<Contacts>", "");
		xml = xml.replaceAll("</Contacts>", "");
		xml = xml.replaceAll("</Contact>", "");
		String[] sep = xml.split("<Contact>");
		Vector<Contacts> contacts = new Vector<Contacts>();
		for (String i : sep) {
			try {
				Contacts c = new Contacts();
				c.id = Long.parseLong(i);
				contacts.add(c);
			} catch(NumberFormatException e) { }
		}
		return contacts;
	}
}
